# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AlertCenter.V1beta1.Model.GoogleOperations do
  @moduledoc """
  An incident reported by Google Operations for a Google Workspace application.

  ## Attributes

  *   `affectedUserEmails` (*type:* `list(String.t)`, *default:* `nil`) - The list of emails which correspond to the users directly affected by the incident.
  *   `attachmentData` (*type:* `GoogleApi.AlertCenter.V1beta1.Model.Attachment.t`, *default:* `nil`) - Optional. Application-specific data for an incident, provided when the Google Workspace application which reported the incident cannot be completely restored to a valid state.
  *   `description` (*type:* `String.t`, *default:* `nil`) - A detailed, freeform incident description.
  *   `domain` (*type:* `String.t`, *default:* `nil`) - Customer domain for email template personalization.
  *   `header` (*type:* `String.t`, *default:* `nil`) - A header to display above the incident message. Typically used to attach a localized notice on the timeline for followup comms translations.
  *   `title` (*type:* `String.t`, *default:* `nil`) - A one-line incident description.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :affectedUserEmails => list(String.t()) | nil,
          :attachmentData => GoogleApi.AlertCenter.V1beta1.Model.Attachment.t() | nil,
          :description => String.t() | nil,
          :domain => String.t() | nil,
          :header => String.t() | nil,
          :title => String.t() | nil
        }

  field(:affectedUserEmails, type: :list)
  field(:attachmentData, as: GoogleApi.AlertCenter.V1beta1.Model.Attachment)
  field(:description)
  field(:domain)
  field(:header)
  field(:title)
end

defimpl Poison.Decoder, for: GoogleApi.AlertCenter.V1beta1.Model.GoogleOperations do
  def decode(value, options) do
    GoogleApi.AlertCenter.V1beta1.Model.GoogleOperations.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AlertCenter.V1beta1.Model.GoogleOperations do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
